package com.ziki.account.config;

import com.ziki.common.util.uuid.IDUtil;
import org.apache.shardingsphere.spi.keygen.ShardingKeyGenerator;

import java.util.Properties;

public final class CustomKeyGenerator implements ShardingKeyGenerator {
    @Override
    public Comparable<?> generateKey() {
        return IDUtil.snowflakeID2();
    }

    @Override
    public String getType() {
        return "MyUUID";
    }

    @Override
    public Properties getProperties() {
        return null;
    }

    @Override
    public void setProperties(Properties properties) {

    }
}
